package com.seveneight.baijiesteward.ui.user.presenter;

import android.content.Context;

import com.seveneight.baijiesteward.bean.AnyBean;
import com.seveneight.baijiesteward.http.MyCallBack;
import com.seveneight.baijiesteward.ui.user.contract.UpgradeContract;
import com.seveneight.baijiesteward.ui.user.model.UpgradeModel;

import okhttp3.RequestBody;

/**
 * Created by user1 on 2018/3/27.
 */

public class UpgradePresenter implements UpgradeContract.UpgradePresenter {

    UpgradeContract.UpgradeView upgradeView;
    UpgradeContract.UpgredeModel upgredeModel;

    public UpgradePresenter(UpgradeContract.UpgradeView upgradeView) {
        this.upgradeView = upgradeView;
        upgredeModel = new UpgradeModel();
    }

    @Override
    public void upUserGrade(Context context, RequestBody body) {
        upgredeModel.upUserGrade(context,body, new MyCallBack<String>() {
            @Override
            public void onSuccess(String PayInfo) {
                upgradeView.upgradeStatus(PayInfo);
            }

            @Override
            public void onFailed() {

            }
        });
    }
}
